//冒泡排序
public class test7 {
    public static void main(String[] args) {
        int[] arr = {6, 9, 2, 9,1};
        for (int j=0;j<arr.length;j++){
        for (int i = 0; i < arr.length-1-j; i++) {
            if (arr[i] > arr[i + 1]) {
                int temp = arr[i];
                arr[i] = arr[i + 1];
                arr[i + 1] = temp;
            }
        }
        }
        for (int j : arr) {
            System.out.print(j + "\t");
              System.out.print(j + "\t");
        }
    }
}
